/* Copyright 2001,2002,2003 NAH6 BV
 * All Rights Reserved
 *
 *  $Header: /var/lib/cvs/secphone/ui/misc/winWatchedVariable.h,v 1.6 2003/11/21 16:12:58 itsme Exp $
 *
 *
 * not used yet
 */

#ifndef __WINWATCHEDVARIABLE_H__

template<class T>
class WatchedVariable {
public:
    WatchedVariable(HANDLE hEvent)
        : m_hEvent(hEvent)
    {

    }
    ~WatchedVariable()
    {
    }

    void SetValue(const T& val)
    {
        if (m_value==val)
            return;

        m_value= val;
        SetEvent(m_hEvent);
    }

private:
    T m_value;
    HANDLE m_hEvent;
};

#define __WINWATCHEDVARIABLE_H__
#endif
